package com.test.selenium.data;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Iterator;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;

public class InputTestData {
	private ShipmentData shipmentData;
	private MovementData movement1Data;
	private MovementData movement2Data;
	
	public InputTestData() throws IOException {
		readAllFromXls();
	}
	
	private void readAllFromXls() throws IOException{
		FileInputStream file;
		file = new FileInputStream(new File("../selenium/src/Input/SmokeTestAirMode_InputSheet.xls"));
		HSSFWorkbook workbook = new HSSFWorkbook(file);
		shipmentData = new ShipmentData(workbook.getSheet("Shipment"));
		movement1Data = new MovementData(workbook.getSheet("Movement1"));
		movement2Data = new MovementData(workbook.getSheet("Movement2"));
		
		file.close();
	}
	
	public ShipmentData getShipmentData() {
		return this.shipmentData;
	}
	
	public MovementData getMovement1Data() {
		return this.movement1Data;
	}
	
	public MovementData getMovement2Data() {
		return this.movement2Data;
	}

}
